package com.ruge;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class RestTestController {
    @RequestMapping("zidingyi")
    public String hi() {
        return "自定义的注解扫描到的Controller";
    }

    @RequestMapping(value = "rest", method = RequestMethod.GET)
    public String query(@RequestParam(name = "msg", required = false, defaultValue = "谁在悬崖沏一壶茶") String msg) {
        return msg;
    }
}
